package com.ylr.blog.framework.controller.web;

import java.util.Map;

import com.ylr.base.common.tool.Result;
import com.ylr.blog.framework.service.PublishBlogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.web.bind.annotation.*;

import com.ylr.blog.framework.entity.PublishBlogEntity;

import javax.annotation.Resource;



/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-05-18 21:39:36
 * className: PublishBlogWebController
 * version: 1.0
 * description:
 */
@RestController
@RequestMapping("/web/publish-blog")
public class PublishBlogWebController {

    private static final Logger log = LoggerFactory.getLogger(PublishBlogWebController.class);

    @Resource(name = "publishBlogService")
    private PublishBlogService publishBlogService;

    /**
     * 保存
     */
    @PostMapping("/save")
    public Result<Object> saveYbPublishBlog(@RequestBody PublishBlogEntity ybPublishBlog) {
//        publishBlogService.save(ybPublishBlog);

        return Result.success();
    }

    /**
     * 列表
     */
    @GetMapping("/page/list")
    public Result<Object> pageYbPublishBlogList(@RequestParam Map<String, Object> params) {
//        PageUtils page = publishBlogService.queryPage(params);

        return Result.success();
    }


    /**
     * 信息
     */
    @GetMapping("/get")
    public Result<Object> getYbPublishBlog(@RequestParam("blogId") Long blogId) {
//		PublishBlogEntity ybPublishBlog = publishBlogService.getById(blogId);

        return Result.success();
    }

    /**
     * 修改
     */
    @PostMapping("/update")
    public Result<Object> updateYbPublishBlog(@RequestBody PublishBlogEntity ybPublishBlog) {
//		publishBlogService.updateById(ybPublishBlog);

        return Result.success();
    }

    /**
     * 删除
     */
    @DeleteMapping("/delete")
    public Result<Object> deleteYbPublishBlog(@RequestBody Long[] blogIds) {
//		publishBlogService.removeByIds(Arrays.asList(blogIds));

        return Result.success();
    }

}
